package action.page;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import bean.Operation;

/*
 * 点击登录操作
 */
public class Login {
	public String execute() {
		// 得到HttpSession方法
		HttpSession session = ServletActionContext.getRequest().getSession();

		// 如果username为空则未登录
		if (session.getAttribute("username") == null) {
			return "login";
		} else {
			return "true";
		}
	}

}
